package com.zzu.chat.chat.detail.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.zzu.chat.R;
import com.zzu.chat.bean.SubComment;

import java.util.LinkedList;

public class SubComments_Adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>{
    private LinkedList<SubComment> subComments = new LinkedList<>();
    private Context context ;
    public SubComments_Adapter(LinkedList<SubComment> subComments, Context context){
        this.context = context;
        this.subComments = subComments;
    }
    @NonNull
    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(context).inflate(R.layout.adapter_subcomments_item,parent,false);
        return new SubCommentViewHolder(view);
    }

    @Override
    public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {

    }

    @Override
    public int getItemViewType(int position) {
        return super.getItemViewType(position);
    }

    @Override
    public int getItemCount() {
        return 1;
    }

    class SubCommentViewHolder extends RecyclerView.ViewHolder{
        TextView tv_username,tv_subcontent;
        public SubCommentViewHolder(View ItemView){
            super(ItemView);
            tv_username = ItemView.findViewById(R.id.tv_username_subcomment_item);
            tv_subcontent = ItemView.findViewById(R.id.tv_content_subcomment_item);
        }
    }
}
